From 59bdb19b0ebd20f1196a15a2fc1c2f6307102646 Mon Sep 17 00:00:00 2001 From: Jonathan Blandford Date: Wed, 12 Dec 2001 20:10:52 +0000 Subject: [PATCH] keep in sync with insert_page_menu. Code duplication is bad. Wed Dec 12 15:01:33 2001 Jonathan Blandford * gtk/gtknotebook.c (gtk_notebook_set_tab_label): keep in sync with insert_page_menu. Code duplication is bad. * gtk/gtklabel.c (gtk_label_mnemonic_activate): Whoops -- got the wrong fix yesterday. --- ChangeLog | 8 ++++++++ ChangeLog.pre-2-0 | 8 ++++++++ ChangeLog.pre-2-10 | 8 ++++++++ ChangeLog.pre-2-2 | 8 ++++++++ ChangeLog.pre-2-4 | 8 ++++++++ ChangeLog.pre-2-6 | 8 ++++++++ ChangeLog.pre-2-8 | 8 ++++++++ gtk/gtklabel.c | 2 +- gtk/gtknotebook.c | 8 ++++++++ 9 files changed, 65 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 047ae29302..0bffb6ba4e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +Wed Dec 12 15:01:33 2001 Jonathan Blandford + + * gtk/gtknotebook.c (gtk_notebook_set_tab_label): keep in sync + with insert_page_menu. Code duplication is bad. + + * gtk/gtklabel.c (gtk_label_mnemonic_activate): Whoops -- got the + wrong fix yesterday. + Wed Dec 12 14:27:30 2001 Owen Taylor * gtk/gtkmenubar.c (window_key_press_handler): Fix check for diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 047ae29302..0bffb6ba4e 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,11 @@ +Wed Dec 12 15:01:33 2001 Jonathan Blandford + + * gtk/gtknotebook.c (gtk_notebook_set_tab_label): keep in sync + with insert_page_menu. Code duplication is bad. + + * gtk/gtklabel.c (gtk_label_mnemonic_activate): Whoops -- got the + wrong fix yesterday. + Wed Dec 12 14:27:30 2001 Owen Taylor * gtk/gtkmenubar.c (window_key_press_handler): Fix check for diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 047ae29302..0bffb6ba4e 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +Wed Dec 12 15:01:33 2001 Jonathan Blandford + + * gtk/gtknotebook.c (gtk_notebook_set_tab_label): keep in sync + with insert_page_menu. Code duplication is bad. + + * gtk/gtklabel.c (gtk_label_mnemonic_activate): Whoops -- got the + wrong fix yesterday. + Wed Dec 12 14:27:30 2001 Owen Taylor * gtk/gtkmenubar.c (window_key_press_handler): Fix check for diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 047ae29302..0bffb6ba4e 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,11 @@ +Wed Dec 12 15:01:33 2001 Jonathan Blandford + + * gtk/gtknotebook.c (gtk_notebook_set_tab_label): keep in sync + with insert_page_menu. Code duplication is bad. + + * gtk/gtklabel.c (gtk_label_mnemonic_activate): Whoops -- got the + wrong fix yesterday. + Wed Dec 12 14:27:30 2001 Owen Taylor * gtk/gtkmenubar.c (window_key_press_handler): Fix check for diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 047ae29302..0bffb6ba4e 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,11 @@ +Wed Dec 12 15:01:33 2001 Jonathan Blandford + + * gtk/gtknotebook.c (gtk_notebook_set_tab_label): keep in sync + with insert_page_menu. Code duplication is bad. + + * gtk/gtklabel.c (gtk_label_mnemonic_activate): Whoops -- got the + wrong fix yesterday. + Wed Dec 12 14:27:30 2001 Owen Taylor * gtk/gtkmenubar.c (window_key_press_handler): Fix check for diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 047ae29302..0bffb6ba4e 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +Wed Dec 12 15:01:33 2001 Jonathan Blandford + + * gtk/gtknotebook.c (gtk_notebook_set_tab_label): keep in sync + with insert_page_menu. Code duplication is bad. + + * gtk/gtklabel.c (gtk_label_mnemonic_activate): Whoops -- got the + wrong fix yesterday. + Wed Dec 12 14:27:30 2001 Owen Taylor * gtk/gtkmenubar.c (window_key_press_handler): Fix check for diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 047ae29302..0bffb6ba4e 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +Wed Dec 12 15:01:33 2001 Jonathan Blandford + + * gtk/gtknotebook.c (gtk_notebook_set_tab_label): keep in sync + with insert_page_menu. Code duplication is bad. + + * gtk/gtklabel.c (gtk_label_mnemonic_activate): Whoops -- got the + wrong fix yesterday. + Wed Dec 12 14:27:30 2001 Owen Taylor * gtk/gtkmenubar.c (window_key_press_handler): Fix check for diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index 450f114ac4..df8dd74cd8 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -668,7 +668,7 @@ gtk_label_mnemonic_activate (GtkWidget *widget, parent = widget->parent; if (parent && GTK_IS_NOTEBOOK (parent)) - return gtk_widget_mnemonic_activate (parent, group_cycling); + return FALSE; while (parent) { diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 962dc26bf5..6c3466c2f1 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -4494,6 +4494,7 @@ gtk_notebook_set_tab_label (GtkNotebook *notebook, if (page->tab_label == tab_label) return; + gtk_notebook_remove_tab_label (notebook, page); if (tab_label) @@ -4518,6 +4519,13 @@ gtk_notebook_set_tab_label (GtkNotebook *notebook, } } + if (page->tab_label) + page->mnemonic_activate_signal = + gtk_signal_connect (GTK_OBJECT (page->tab_label), + "mnemonic_activate", + (GtkSignalFunc) gtk_notebook_mnemonic_activate_switch_page, + notebook); + if (notebook->show_tabs && GTK_WIDGET_VISIBLE (child)) { gtk_widget_show (page->tab_label); -- 2.30.2